import { User } from './user-model.js';
import { Token } from '../../utils/token.js';
var app = getApp();
var token = new Token();
var user = new User();

Page({
  data: {

  },
  _loadData: function (uid) {
    user.getUserInfo(uid,(data) => {
      this.setData({
        userArr: data.data,
      })
    })
  },
  onShow() {
   var that =this;
    app.userLogin(app.globalData.shopid,(data)=>{
      if(data)
      {
        that._loadData(app.globalData.uid);
      }
    });
    
  },
  //拨打电话
  call: function () {
    my.makePhoneCall({
      number: '400-011-9619', // 电话号码
    });
  },
});
